import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { UserType, UserStatus } from '../enum/dbParams';

@Entity()
export class VoteUser {
  @PrimaryGeneratedColumn()
  u_id: number;
  @Column({
    length: 20
  })
  u_name: string;
  @Column({
    type: 'char',
    length: 32
  })
  u_password: string;
  @Column({
    type: 'enum',
    enum: UserType,
    default: UserType.USER
  })
  u_type: string;
  @Column({
    width: 10
  })
  u_createtime: number;
  @Column({
    type: 'enum',
    enum: UserStatus,
    default: UserStatus.NORMAL
  })
  u_status: string;
}
